MuleSoft Accelerator for SAP
Anypoint Partner Manager EDI setup guide
The following setup guide provides instructions to configure Anypoint Partner Manager (APM) to enable a trading partner to exchange EDI messages. SAP S/4HANA is used as the backend ERP system for creating and managing purchase orders, invoices, shipping notices, and invoice payments.
Configure storage
Configure your storage solution as described here to store transmission content.
Configure host
Configure the host organization as described here. For this use case, setup the following identifiers:
- EDIFACT - UNB:ZZZ - Mututally Defined
- Reference ID
- X12 - GS
- X12 - ISA with ZZ
Create message types
Creating X12 inbound message types for Purchase Order EDI 850 and Remittance Notice EDI 820
- Click New message type and select 'Receive from partner' from the Usage dropdown.
- Select 'X12' from Format dropdown to receive X12 EDI messages and version as '4010'.
- Select Message type as 850 or 820.
- For Schema, select the 'Use standard' option.
Creating X12 outbound message types for PO ACK 855, Shipping Notice 856, and Invoice Notice 810
- Click New message type and select 'Send to partner' from the Usage dropdown.
- Select 'X12' from Format dropdown to receive X12 EDI Messages and version as '4010'.
- Select Message Type as 855, 856, or 810.
- For Schema, select the 'Use standard' option.
Creating EDIFACT inbound message types for Purchase Order ORDERS and Remittance Notice EDI REMADV
- Click New message type and select 'Receive from partner' from the Usage dropdown.
- Select 'EDIFACT' from Format dropdown to receive EDIFACT EDI messages and version as 'd97a'.
- Select Message type as ORDERS or REMADV.
- For Schema, select the 'Use standard' option.
Creating EDIFACT outbound message types for PO ORDRSP, Shipping Notice DESADV, and Invoice Notice INVOIC
- Click New message type and select 'Send to partner' from the Usage dropdown.
- Select 'EDIFACT' from Format drodown to receive X12 EDI Messages and version as 'd97a'.
- Select Message Type as ORDRSP, DESADV, or INVOIC.
- For Schema, select the 'Use standard' option.
Creating Source message types to receive outbound message requests from the host's ERP System
- Click New message type and select 'Source at the host' from the Usage dropdown.
- Select 'Format JSON' to receive outbound message requests in JSON from the SAP Event Listener API.
- Upload JSON Schema for PO ACK, Invoice, and Shipping Notice matching the request schema.
- Upload the Reference dwl for reading identifiers and business mapping keys.
Creating target message types for PO and Remittance Info
- Click New message type and select 'Target at host' from the Usage dropdown.
- Select 'Format JSON' to receive inbound messages in JSON from Inbound Message flows.
- Upload the JSON Schema for Order CIM and Payments CIM format.
Create host endpoints
Configuring endpoints for inbound messages
- Click New and select 'Target at host' to configure endpoints for the ERP Orders Process API and the Invoice Payments System API.
- Use 'HTTPS' as the protocol and configure the host endpoint in the URL.
- Select the 'Authentication type' based on host API requirements and appropriate certicate.
Configuring APM endpoints for outbound messages
- Click New and select 'Source at host' in the Usage field to receive messages from the SAP S/4HANA Event Listener.
- Use 'HTTPS' in the Protocol field and configure the URL, Base Path, and Authentication type as shown in the following:
Configure partner
Configure the trading partner as described here.
For exchanging messages using X12 format, set up the following identifiers:
- Reference ID
- X12 - GS
- X12 - ISA with ZZ
For exchanging messages using EDIFACT format, set up the following identifiers:
- Reference ID
- EDIFACT - UNB:ZZZ - Mutually Defined
Create partner endpoints
To receive and send EDI messages, set up endpoints based on the mode of exchanging messages such as FTP, AS2, or HTTPS.
Configuring receive endpoints
- Click New and select 'Receive from partners' from the Usage dropdown.
- Select 'SFTP' in the Protocol dropdown to receive files from a partner's SFTP host.
- Add the SFTP host and authentication information.
- Create multiple endpoints for picking up different EDI message types.
Configuring send endpoints
- Click New and select 'Send to partners' from the Usage dropdown.
- Select 'SFTP' in the Protocol dropdown to send files to a partner's SFTP host.
- Add the SFTP host and authentication information.
Create APM message flows (For X12)
Create message flows for each EDI message type with source and target endpoints, message types, and mapping scripts to convert to and from X12 EDI Message formats.
Receiving PO 850 from NTO Retail Partner
- Select New message flow -> Receive from partner on the 'Message flows' page in APM.
- Select NTO Retail or the partner to receive PO from.
- Under the Receive section, select the endpoint you created earlier to receive EDI 850 message from SFTP Host.
- Select Message type as X12-4010-850.
- Under the Map Section, upload the
po-nto-x12-4010-850-to-order.dwl
file. - Select the Target message type as 'JSON-orderscim' and Endpoint as ERP Orders Process API.
Sending PO ACK 855 to NTO Retail
- Select New message flow -> Send to partner on the 'Message flows' page in APM.
- Select NTO Retail or the partner to send POC Ack.
- Under the Receive section, select the 'APM Send EDI Host' endpoint.
- Select Message type as JSON-poack.
- Select Reference IDs to route messages to this flow.
- Under the Map Section, upload the
poack-sap-to-nto-x12-4010-855.dwl
file. - Select the Target message type as 'X12-4010-855' and Endpoint as 'SFTP-ntoretail-inbound'.
Sending Shipping Notice 856 to NTO Retail
- Select New message flow -> Send to partner on the 'Message flows' page in APM.
- Select NTO Retail or the partner to send Shipping Notice.
- Under the Receive section, select the 'APM Send EDI Host' endpoint.
- Select Message Type as JSON-poack.
- Under the Map Section, upload the
shipping-sap-to-nto-x12-4010-856.dwl
file. - Select Target message type as 'X12-4010-856' and Endpoint as 'SFTP-ntoretail-inbound'.
Sending Invoice 810 to NTO Retail
- Select New message flow -> Send to partner on the 'Message flows' page in APM.
- Select NTO Retail or the partner to send Invoice.
- Under the Receive section, select the 'APM Send EDI Host' endpoint.
- Select Message Type as JSON-pack.
- Under the Map Section, upload the
invoice-sap-to-nto-x12-4010-820.dwl
file. - Select Target message type as 'X12-4010-856' and Endpoint as 'SFTP-ntoretail-inbound'.
Receiving Remittance / Payment Info 820 from NTO Retail Partner
- Select New message flow -> Receive from partner on the 'Message flows' page in APM.
- Select NTO Retail or the partner to receive Payment Info from.
- Under the Receive section, select the endpoint you created earlier to receive EDI 820 message from SFTP Host.
- Select Message Type as X12-4010-820.
- Under the Map Section, upload the
po-nto-x12-4010-820-to-payment.dwl
file. - Select Target message type as 'JSON-paymentscim' and Endpoint as Invoice Payments System API.
Create APM message flows (For EDIFACT)
Create message flows for each EDI message type with source and target endpoints, message types, and mapping scripts to convert to and from EDIFACT EDI Message formats.
Receiving PO ORDERS from INGEN Systems Partner
- Select New message flow -> Receive from partner on the 'Message flows' page in APM.
- Select INGEN Systems or the partner to receive PO from.
- Under the Receive section, select the endpoint you created earlier to receive EDI ORDERS message from SFTP Host.
- Select Message type as EDIFACT-d97a-ORDERS.
- Under the Map Section, upload the
po-ingen-edifact-d97a-ORDERS-to-order.dwl
file. - Select the Target message type as 'JSON-orderscim' and Endpoint as ERP Orders Process API.
Sending PO ACK ORDRSP to INGEN Systems
- Select New message flow -> Send to partner on the 'Message flows' page in APM.
- Select INGEN Systems or the partner to send POC Ack.
- Under the Receive section, select the 'APM Send EDI Host' endpoint.
- Select Message type as JSON-poack.
- Select Reference IDs to route messages to this flow.
- Under the Map Section, upload the
poack-sap-to-ingen-edifact-d97a-ORDRSP.dwl
file. - Select the Target message type as 'EDIFACT-d97a-ORDRSP' and Endpoint as 'SFTP-ingen-inbound'.
Sending Shipping Notice DESADV to INGEN Systems
- Select New message flow -> Send to partner on the 'Message flows' page in APM.
- Select INGEN Systems or the partner to send Shipping Notice.
- Under the Receive section, select the 'APM Send EDI Host' endpoint.
- Select Message Type as JSON-poack.
- Under the Map Section, upload the
shipping-sap-to-ingen-edifact-d97a-DESADV.dwl
file. - Select Target message type as 'EDIFACT-d97a-DESADV' and Endpoint as 'SFTP-ingen-inbound'.
Sending Invoice INVOIC to INGEN Systems
- Select New message flow -> Send to partner on the 'Message flows' page in APM.
- Select INGEN Systems or the partner to send Invoice.
- Under the Receive section, select the 'APM Send EDI Host' endpoint.
- Select Message Type as JSON-pack.
- Under the Map Section, upload the
invoice-sap-to-ingen-edifact-d97a-INVOIC.dwl
file. - Select Target message type as 'EDIFACT-d97a-INVOIC' and Endpoint as 'SFTP-ingen-inbound'.
Receiving Remittance / Payment Info REMADV from INGEN Systems Partner
- Select New message flow -> Receive from partner on the 'Message flows' page in APM.
- Select INGEN Systems or the partner to receive Payment Info from.
- Under the Receive section, select the endpoint you created earlier to receive EDIFACT REMADV from SFTP Host.
- Select Message Type as EDIFACT-d97a-REMADV.
- Under the Map Section, upload the
remittance-ingen-edifact-d97a-REMADV-to-payment.dwl
file. - Select Target message type as 'JSON-paymentscim' and Endpoint as Invoice Payments System API.
After you complete the message flows configuration, deploy the message flows.
You can also visit the troubleshooting steps if your Partner Manager is not working as expected.